<?php

class Ms_Model_ForumCategory extends Zend_Db_Table_Abstract
{

    protected $_name = 'forum_categories';
    
    /**
     * 获取论坛分类
     *
     * 按位置进行排序
     */
    public function getCategories(){
        
        $select = $this->select();
        $select->order('position ASC');
        $categories = $this->fetchAll($select);
        if ($categories){
            return $categories;
        }
        else{
            return null;
        }
    }
    
}

